package makeSmallestPalindrome;

public class Solution {
    public String makeSmallestPalindrome(String s) {
        //
        char[] strs = s.toCharArray();
        int i = 0,j = s.length()-1;
        while (i<j) {
            if(strs[i]>strs[j]) {
                strs[i] = strs[j];
            } else if (strs[i]<strs[j]) {
                strs[j] = strs[i];
            }
        }
        return new String(strs);
    }
}
